using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Interpolation
{
    /// <summary>
    /// <para>Kriging</para>
    /// <para>Interpolates a raster surface from points using kriging.</para>
    /// <para>使用克里金法从点插值栅格表面。</para>
    /// </summary>    
    [DisplayName("Kriging")]
    public class Kriging : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Kriging()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_point_features">
        /// <para>Input point features</para>
        /// <para>The input point features containing the z-values to be interpolated into a surface raster.</para>
        /// <para>包含要插值到表面栅格中的 z 值的输入点要素。</para>
        /// </param>
        /// <param name="_z_field">
        /// <para>Z value field</para>
        /// <para><xdoc>
        ///   <para>The field that holds a height or magnitude value for each point.</para>
        ///   <para>This can be a numeric field or the Shape field if the input point features contain z-values.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>保存每个点的高度或大小值的字段。</para>
        ///   <para>这可以是数值字段，也可以是形状字段（如果输入点要素包含 z 值）。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_surface_raster">
        /// <para>Output surface raster</para>
        /// <para><xdoc>
        ///   <para>The output interpolated surface raster.</para>
        ///   <para>It is always a floating-point raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出插值表面栅格。</para>
        ///   <para>它始终是浮点栅格。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_semiVariogram_props">
        /// <para>Semivariogram properties</para>
        /// <para><xdoc>
        ///   <para>The Semivariogram model to be used. There are two methods for kriging: Ordinary and Universal.</para>
        ///   <para>Ordinary kriging can use the following semivariogram models:</para>
        ///   <bulletList>
        ///     <bullet_item>Spherical—Spherical semivariogram model. This is the default.</bullet_item><para/>
        ///     <bullet_item>Circular—Circular semivariogram model.</bullet_item><para/>
        ///     <bullet_item>Exponential—Exponential semivariogram model.</bullet_item><para/>
        ///     <bullet_item>Gaussian—Gaussian or normal distribution semivariogram model.</bullet_item><para/>
        ///     <bullet_item>Linear—Linear semivariogram model with a sill.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Universal kriging can use the following semivariogram models:</para>
        ///   <bulletList>
        ///     <bullet_item>Linear with Linear drift—Universal Kriging with linear drift.</bullet_item><para/>
        ///     <bullet_item>Linear with Quadratic drift—Universal Kriging with quadratic drift.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>There are options available via the Advanced Parameters dialog box. These parameters are:</para>
        ///   <bulletList>
        ///     <bullet_item>Lag size—The default is the output raster cell size.</bullet_item><para/>
        ///     <bullet_item>Major range—Represents a distance beyond which there is little or no correlation.</bullet_item><para/>
        ///     <bullet_item>Partial sill—The difference between the nugget and the sill.</bullet_item><para/>
        ///     <bullet_item>Nugget—Represents the error and variation at spatial scales too fine to detect. The nugget effect is seen as a discontinuity at the origin.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要使用的半变异函数模型。克里金法有两种：普通克里金法和通用法。</para>
        ///   <para>普通克里金法可以使用以下半变异函数模型：</para>
        ///   <bulletList>
        ///     <bullet_item>球面 - 球面半变异函数模型。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>圆形 - 圆形半变异函数模型。</bullet_item><para/>
        ///     <bullet_item>指数 （Exponential） - 指数半变异函数模型。</bullet_item><para/>
        ///     <bullet_item>高斯 - 高斯或正态分布半变异函数模型。</bullet_item><para/>
        ///     <bullet_item>线性 （Linear） - 带门槛的线性半变异函数模型。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>通用克里金法可以使用以下半变异函数模型：</para>
        ///   <bulletList>
        ///     <bullet_item>线性漂移 （Linear with Linear drift） - 带线性漂移的通用克里金曲线。</bullet_item><para/>
        ///     <bullet_item>带二次漂移的线性 - 带二次漂移的通用克里金曲线。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>可以通过“高级参数”对话框提供一些选项。这些参数包括：</para>
        ///   <bulletList>
        ///     <bullet_item>滞后大小 - 默认值为输出栅格像元大小。</bullet_item><para/>
        ///     <bullet_item>主要范围 - 表示相关性很小或没有相关性的距离。</bullet_item><para/>
        ///     <bullet_item>部分门槛 （Partial sill） - 块和门槛之间的差值。</bullet_item><para/>
        ///     <bullet_item>块 - 表示空间尺度上的误差和变化，太细而无法检测。金块效应被视为原点的不连续性。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public Kriging(object _in_point_features, object _z_field, object _out_surface_raster, object _semiVariogram_props)
        {
            this._in_point_features = _in_point_features;
            this._z_field = _z_field;
            this._out_surface_raster = _out_surface_raster;
            this._semiVariogram_props = _semiVariogram_props;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Kriging";

        public override string CallName => "sa.Kriging";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_point_features, _z_field, _out_surface_raster, _semiVariogram_props, _cell_size, _search_radius, _out_variance_prediction_raster];

        /// <summary>
        /// <para>Input point features</para>
        /// <para>The input point features containing the z-values to be interpolated into a surface raster.</para>
        /// <para>包含要插值到表面栅格中的 z 值的输入点要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input point features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_point_features { get; set; }


        /// <summary>
        /// <para>Z value field</para>
        /// <para><xdoc>
        ///   <para>The field that holds a height or magnitude value for each point.</para>
        ///   <para>This can be a numeric field or the Shape field if the input point features contain z-values.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>保存每个点的高度或大小值的字段。</para>
        ///   <para>这可以是数值字段，也可以是形状字段（如果输入点要素包含 z 值）。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z value field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _z_field { get; set; }


        /// <summary>
        /// <para>Output surface raster</para>
        /// <para><xdoc>
        ///   <para>The output interpolated surface raster.</para>
        ///   <para>It is always a floating-point raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出插值表面栅格。</para>
        ///   <para>它始终是浮点栅格。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output surface raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_surface_raster { get; set; }


        /// <summary>
        /// <para>Semivariogram properties</para>
        /// <para><xdoc>
        ///   <para>The Semivariogram model to be used. There are two methods for kriging: Ordinary and Universal.</para>
        ///   <para>Ordinary kriging can use the following semivariogram models:</para>
        ///   <bulletList>
        ///     <bullet_item>Spherical—Spherical semivariogram model. This is the default.</bullet_item><para/>
        ///     <bullet_item>Circular—Circular semivariogram model.</bullet_item><para/>
        ///     <bullet_item>Exponential—Exponential semivariogram model.</bullet_item><para/>
        ///     <bullet_item>Gaussian—Gaussian or normal distribution semivariogram model.</bullet_item><para/>
        ///     <bullet_item>Linear—Linear semivariogram model with a sill.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Universal kriging can use the following semivariogram models:</para>
        ///   <bulletList>
        ///     <bullet_item>Linear with Linear drift—Universal Kriging with linear drift.</bullet_item><para/>
        ///     <bullet_item>Linear with Quadratic drift—Universal Kriging with quadratic drift.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>There are options available via the Advanced Parameters dialog box. These parameters are:</para>
        ///   <bulletList>
        ///     <bullet_item>Lag size—The default is the output raster cell size.</bullet_item><para/>
        ///     <bullet_item>Major range—Represents a distance beyond which there is little or no correlation.</bullet_item><para/>
        ///     <bullet_item>Partial sill—The difference between the nugget and the sill.</bullet_item><para/>
        ///     <bullet_item>Nugget—Represents the error and variation at spatial scales too fine to detect. The nugget effect is seen as a discontinuity at the origin.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要使用的半变异函数模型。克里金法有两种：普通克里金法和通用法。</para>
        ///   <para>普通克里金法可以使用以下半变异函数模型：</para>
        ///   <bulletList>
        ///     <bullet_item>球面 - 球面半变异函数模型。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>圆形 - 圆形半变异函数模型。</bullet_item><para/>
        ///     <bullet_item>指数 （Exponential） - 指数半变异函数模型。</bullet_item><para/>
        ///     <bullet_item>高斯 - 高斯或正态分布半变异函数模型。</bullet_item><para/>
        ///     <bullet_item>线性 （Linear） - 带门槛的线性半变异函数模型。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>通用克里金法可以使用以下半变异函数模型：</para>
        ///   <bulletList>
        ///     <bullet_item>线性漂移 （Linear with Linear drift） - 带线性漂移的通用克里金曲线。</bullet_item><para/>
        ///     <bullet_item>带二次漂移的线性 - 带二次漂移的通用克里金曲线。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>可以通过“高级参数”对话框提供一些选项。这些参数包括：</para>
        ///   <bulletList>
        ///     <bullet_item>滞后大小 - 默认值为输出栅格像元大小。</bullet_item><para/>
        ///     <bullet_item>主要范围 - 表示相关性很小或没有相关性的距离。</bullet_item><para/>
        ///     <bullet_item>部分门槛 （Partial sill） - 块和门槛之间的差值。</bullet_item><para/>
        ///     <bullet_item>块 - 表示空间尺度上的误差和变化，太细而无法检测。金块效应被视为原点的不连续性。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Semivariogram properties")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _semiVariogram_props { get; set; }


        /// <summary>
        /// <para>Output cell size</para>
        /// <para><xdoc>
        ///   <para>The cell size of the output raster that will be created.</para>
        ///   <para>This parameter can be defined by a numeric value or obtained from an existing raster dataset. If the cell size hasn't been explicitly specified as the parameter value, the environment cell size value will be used if specified; otherwise, additional rules will be used to calculate it from the other inputs. See the usage section for more detail.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将创建的输出栅格的像元大小。</para>
        ///   <para>此参数可以由数值定义，也可以从现有栅格数据集中获取。如果尚未将像元大小显式指定为参数值，则在指定的情况下将使用环境像元大小值;否则，将使用其他规则从其他输入计算它。有关详细信息，请参阅用法部分。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output cell size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _cell_size { get; set; } = null;


        /// <summary>
        /// <para>Search radius</para>
        /// <para><xdoc>
        ///   <para>Defines which of the input points will be used to interpolate the value for each cell in the output raster.</para>
        ///   <para>There are two options: Variable and Fixed. Variable is the default.</para>
        ///   <bulletList>
        ///     <bullet_item>Variable
        ///     <para>Uses a variable search radius in order to find a specified number of input sample points for the interpolation.</para>
        ///     <bulletList>
        ///       <bullet_item>Number of points—An integer value specifying the number of nearest input sample points to be used to perform interpolation. The default is 12 points.  </bullet_item><para/>
        ///       <bullet_item>Maximum distance—Specifies the distance, in map units, by which to limit the search for the nearest input sample points. The default value is the length of the extent's diagonal.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <bulletList>
        ///     <bullet_item>Fixed
        ///     <para>Uses a specified fixed distance within which all input points will be used for the interpolation.</para>
        ///     <bulletList>
        ///       <bullet_item>Distance—Specifies the distance as a radius within which input sample points will be used to perform the interpolation.
        ///         <para>The value of the radius is expressed in map units. The default radius is five times the cell size of the output raster.    </para>
        ///       </bullet_item><para/>
        ///       <bullet_item>Minimum number of points—An integer defining the minimum number of points to be used for interpolation. The default value is 0.
        ///         <para>If the required number of points is not found within the specified distance, the search distance will be increased until the specified minimum number of points is found.    </para>
        ///         <para>When the search radius needs to be increased it is done so until the Minimum number of points fall within that radius, or the extent of the radius crosses the lower (southern) and/or upper (northern) extent of the output raster. NoData is assigned to all locations that do not satisfy the above condition.    </para>
        ///       </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义将使用哪些输入点对输出栅格中每个像元的值进行插值。</para>
        ///   <para>有两个选项：“可变”和“固定”。变量是默认值。</para>
        ///   <bulletList>
        /// <bullet_item>变量
        ///     <para>使用可变搜索半径来查找指定数量的插值输入采样点。</para>
        ///     <bulletList>
        ///       <bullet_item>点数 - 一个整数值，指定用于执行插值的最近输入采样点数。默认值为 12 磅。 </bullet_item><para/>
        ///       <bullet_item>最大距离 - 指定距离（以地图单位表示），用于限制对最近输入采样点的搜索。默认值为范围对角线的长度。 </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <bulletList>
        /// <bullet_item>固定
        ///     <para>使用指定的固定距离，在该距离内，所有输入点都将用于插值。</para>
        ///     <bulletList>
        /// <bullet_item>距离 （Distance） - 将距离指定为半径，在该半径范围内，输入采样点将用于执行插值。
        ///         <para>半径的值以地图单位表示。默认半径为输出栅格像元大小的 5 倍。   </para>
        ///       </bullet_item><para/>
        /// <bullet_item>最小点数 （Minimum number of Points） - 定义用于插值的最小点数的整数。默认值为 0。
        ///         <para>如果在指定距离内未找到所需的点数，则搜索距离将增加，直到找到指定的最小点数。</para>
        ///         <para>当需要增加搜索半径时，将执行此操作，直到最小点数落在该半径内，或者半径范围与输出栅格的下部（南部）和/或上限（北部）范围相交。NoData 将分配给不满足上述条件的所有位置。   </para>
        ///       </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search radius")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _search_radius { get; set; } = null;


        /// <summary>
        /// <para>Output variance of prediction raster</para>
        /// <para>Optional output raster where each cell contains the predicted variance values for that location.</para>
        /// <para>可选输出栅格，其中每个像元都包含该位置的预测方差值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output variance of prediction raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_variance_prediction_raster { get; set; } = null;


        public Kriging SetEnv(int? autoCommit = null, object cellSize = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}